package com.byq.mm.smartlib.cluster.server;

import java.util.HashMap;
import java.util.Map;

import android.content.Context;

import com.byq.mm.abstractx.cluster.server.executor.Executor;
import com.byq.mm.abstractx.engine.CoreEnvironment;
import com.byq.mm.application.cluster.provider.LocationProvider;
import com.byq.mm.application.cluster.provider.OnoffProvider;
import com.byq.mm.application.cluster.provider.PictureProvider;


public class AndroidExecutor implements Executor {
	static Map<String, Class<? extends AndroidExecutor>> types = new HashMap<String, Class<? extends AndroidExecutor>>();
	static{
		types.put(LocationProvider.Define.CLUSTER_NAME, AndroidLocationExecutor.class);
		types.put(PictureProvider.Define.CLUSTER_NAME, AndroidPictureExecutor.class);
		types.put(OnoffProvider.Define.CLUSTER_NAME, AndroidFlashExecutor.class);
	}
	static public Class<? extends AndroidExecutor> getType(String clusterId){
		return types.get(clusterId);
		
	}
	String deviceId;
	String cluster;
	CoreEnvironment env;
	Context ctx;
	public AndroidExecutor(String deviceId, String cluster, CoreEnvironment env,
			Context ctx) {
		super();
		this.deviceId = deviceId;
		this.cluster = cluster;
		this.env = env;
		this.ctx = ctx;
	}


}
